import {removeList} from '@/api/cateList/list'
import { Modal } from 'ant-design-vue';
import { message } from 'ant-design-vue';
import {zdygz,} from './list'
let {data,methodsGet} = zdygz()
export const showDeleteConfirm = (e:any) => {
  console.log(e)
    let{ _id } = e
      Modal.confirm({
        title: '提示',
    
        content: '您确定要删除此分类吗？',
        okText: 'Yes',
        okType: 'danger',
        cancelText: 'No',
        onOk() {
          removeList({
        cate_id:_id
    }).then((res:any)=>{
        console.log(res)
        if(res.code==0){
          message.success(res.msg)
          methodsGet()
        }else{
            message.warning(res.msg)
        }
    })
        },
        onCancel() {
          console.log('Cancel');
        },
      });
    };
